        {{ HTML::style('css/bootstrap.min.css'); }}
        {{ HTML::style('css/bootstrap-theme.min.css'); }}
        {{ HTML::style('css/nanoscroller.css'); }}
        {{ HTML::style('css/style.css'); }}
        {{ HTML::script('js/jquery-1.10.2.min.js'); }}
        {{ HTML::script('js/bootstrap.min.js'); }}
        {{ HTML::script('js/jquery.nanoscroller.min.js'); }}
        {{ HTML::script('js/ckeditor/ckeditor.js'); }}
        {{ HTML::script('js/jqwidgets/jqxcore.js'); }}
        {{ HTML::script('js/jqwidgets/jqxinput.js'); }}
        {{ HTML::style('js/jqwidgets/styles/jqx.base.css'); }}
        {{ HTML::script('js/jqwidgets/jqxvalidator.js') }}
        {{ HTML::script('js/bootstrap.notify.min.js') }}
        
        {{ HTML::script('js/jqwidgets/jqxbuttons.js'); }}
        {{ HTML::script('js/jqwidgets/jqxscrollbar.js') }}
        {{ HTML::script('js/jqwidgets/jqxdata.js'); }}
        {{ HTML::script('js/jqwidgets/jqxlistbox.js') }}
        {{ HTML::script('js/jqwidgets/jqxcombobox.js') }}
        
        
        <script type="text/javascript">
            $(document).ready(function () {
                // prepare the data
                var source =
                {
                    datatype: "json",
                    datafields: [
                        { name: 'ID' },
                        { name: 'MST' }
                    ],
                    url: 'ql=list_cstt'
                };
                var dataAdapter = new $.jqx.dataAdapter(source);
                $("#doantt").jqxComboBox(
                {
                    source: dataAdapter,
                    theme: 'classic',
                    width: 476,
                    height: 27,
                    selectedIndex: 0,
                    displayMember: 'MA_DOAN',
                    valueMember: 'ID'
                });
                $("#cstt").jqxComboBox(
                {
                    source: dataAdapter,
                    theme: 'classic',
                    width: 476,
                    height: 27,
                    selectedIndex: 0,
                    displayMember: 'MST',
                    valueMember: 'ID'
                });
            });
        </script>
        
{{ Form::open(array('url'=>'save=dscuockt','method'=>'post','class'=>'form-horizontal','id'=>'addform','role'=>'form')) }}
{{ Form::token()}}
<div class="panel panel-default">
    <div class="panel-heading">
        <h4 class="panel-title">
            <span class="glyphicon glyphicon-folder-close"></span>
            Thông Tin Cuộc Kiểm Tra
        </h4>
    </div>
    <div class="panel-collapse collapse in">
        <table class="table" cellspacing="0" cellpadding="0" style="margin-bottom: 0px">
            <tr>
                <td>
                    <label for="idd" class="col-sm-3 control-label">Đoàn thanh tra:</label>
                    <div class="col-sm-8 control-label">
                        <div id='doantt'></div>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="cstt" class="col-sm-3 control-label">Cơ sở - Doanh nghiệp:</label>
                    <div class="col-sm-8 control-label">
                        <div id='cstt'></div>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="idnam" class="col-sm-3 control-label">Năm thanh tra:</label>
                    <div class="col-sm-2 control-label">
                        <select id="idnam" name='idnam' class="nam form-control">
                        @foreach($nams as $nam)
                            @if($nam != null)
                                <option value='{{$nam->ID}}'>{{$nam->NAM}}</option>
                            @endif
                        @endforeach
                    </select> 
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="soqd" class="col-sm-3 control-label">Số quyết định:</label>
                    <div class="col-sm-9">
                        {{ Form::text('soqd',Input::old('soqd'),array('placeholder' => 'Nhập số quyết định','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ngaybh" class="col-sm-3 control-label">Ngày ban hành:</label>
                    <div class="col-sm-9">
                        <input name="ngaybh" type="date" class="form-control" required="" value="{{Input::old('ngaybh')}}"/>
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="sott" class="col-sm-3 control-label">Số tờ trình:</label>
                    <div class="col-sm-9">
                        {{ Form::text('sott',Input::old('sott'),array('placeholder' => 'Nhập số tờ trình','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ngaytt" class="col-sm-3 control-label">Ngày ban hành tờ trình:</label>
                    <div class="col-sm-9">
                        <input name="ngaytt" type="date" class="form-control" required="" value="{{Input::old('ngaytt')}}"/>
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="tktt" class="col-sm-3 control-label">Thời kỳ thanh tra:</label>
                    <div class="col-sm-9">
                        {{ Form::text('tktt',Input::old('tktt'),array('placeholder' => 'Nhập thời kỳ thanh tra','class'=>'form-control','required'=>'','pattern'=>'.{3,200}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ngaybdtt" class="col-sm-5 control-label pull-left">Ngày thanh tra bắt đầu từ:</label>
                    <div class="col-sm-3">
                        <input name="ngaybdtt" type="date" class="form-control" required="" value="{{Input::old('ngaybdtt')}}"/>
                    </div>
                    <label for="ngaykttt" class="col-sm-1 control-label"> Đến </label>
                    <div class="col-sm-3">
                        <input name="ngaykttt" type="date" class="form-control" required="" value="{{Input::old('ngaykttt')}}"/>
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="songaylv" class="col-sm-3 control-label">Số ngày làm việc:</label>
                    <div class="col-sm-9">
                        {{ Form::text('songaylv',Input::old('songaylv'),array('placeholder' => 'Nhập số ngày làm việc','class'=>'form-control','required'=>'','pattern'=>'.{1,11}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ndkt" class="col-sm-3 control-label">Nội dung kiểm tra:</label>
                    <div class="col-sm-9">
                        {{ Form::textarea('ndkt',Input::old('ndkt'),array('rows' => '3', 'placeholder' => 'Nhập nội dung kiểm tra','class'=>'form-control','required'=>'','pattern'=>'.{3,500}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="lhkt" class="col-sm-3 control-label">Loại hình kiểm tra:</label>
                    <div class="col-sm-9">
                        {{ Form::text('lhkt',Input::old('lhkt'),array('placeholder' => 'Nhập loại hình kiểm tra','class'=>'form-control','required'=>'','pattern'=>'.{1,100}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ndpc" class="col-sm-3 control-label">Nội dung phân công:</label>
                    <div class="col-sm-9">
                        {{ Form::textarea('ndpc',Input::old('ndpc'),array('rows' => '3', 'placeholder' => 'Nhập nội dung phân công','class'=>'form-control','required'=>'','pattern'=>'.{3,500}',"autofocus"=>"autofocus")) }}
                    </div>
                </td>
            </tr> 
            <tr>
                <td>
                    <label for="ngaybdpc" class="col-sm-5 control-label pull-left">Ngày phân công bắt đầu từ:</label>
                    <div class="col-sm-3">
                        <input name="ngaybdpc" type="date" class="form-control" required="" value="{{Input::old('ngaybdpc')}}"/>
                    </div>
                    <label for="ngayktpc" class="col-sm-1 control-label"> Đến </label>
                    <div class="col-sm-3">
                        <input name="ngayktpc" type="date" class="form-control" required="" value="{{Input::old('ngayktpc')}}"/>
                    </div>
                </td>
            </tr>  
            <tr>
                <td>
                    <label for="ngaybdcb" class="col-sm-5 control-label pull-left">Ngày công bố bắt đầu từ:</label>
                    <div class="col-sm-3">
                        <input name="ngaybdcb" type="date" class="form-control" required="" value="{{Input::old('ngaybdcb')}}"/>
                    </div>
                    <label for="ngayktcb" class="col-sm-1 control-label"> Đến </label>
                    <div class="col-sm-3">
                        <input name="ngayktcb" type="date" class="form-control" required="" value="{{Input::old('ngayktcb')}}"/>
                    </div>
                </td>
            </tr> 
            <tr>                      
                <td>
                    <div class="col-sm-offset-4 col-sm-8"> 
                        <button class="btn btn-success" id='submitbtn' type='submit' title="Lưu cuộc thanh tra"><span class="glyphicon glyphicon-floppy-save">&nbsp;</span>Lưu</button>&nbsp;
                        <a class="btn btn-default" id="backcs_id" href="{{url('ql=dscuockt')}}" title="Quay lại danh sách cuộc thanh tra"><span class="glyphicon glyphicon-arrow-left">&nbsp;</span>Quay lại</a>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</div>

{{Form::close()}}    

@if(Session::has('success')) 
<script type="text/javascript">
    toastr.success("{{Session::get('success')}}");
</script>
@endif
@if(Session::has('error')) 
<script type="text/javascript">
    toastr.error("{{Session::get('error')}}");
</script>
@endif